//
//  MessageKit.h
//  DCMessageKit
//
//  Created by 张涛 on 2020/11/3.
//  Copyright © 2020 张涛. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "DCCustomMessageDelegate.h"
#import "DCChatMessageDelegate.h"
#import "DCMessageKitMacro.h"
#import "DCMessageAdapter.h"
#import "DCAvchatBusiDelegate.h"
#import <DCUtilKit/DCError.h>
#import "DCWhiteBoardDelegate.h"

NS_ASSUME_NONNULL_BEGIN

@interface MessageKit : NSObject<DCCustomMessageDelegate,DCChatMessageDelegate>

+ (instancetype) sharedKit;

//消息监听器
@property(nonatomic,strong) DCMessageAdapter *messageAdapter;
//自定义消息委托
@property(nonatomic,weak) id<DCCustomMessageDelegate> customMessageDelegate;
//聊天消息委托
@property(nonatomic,weak) id<DCChatMessageDelegate> chatMessageDelegate;
//业务委托
@property(nonatomic,weak) id<DCAvchatBusiDelegate> busiDelegate;
//白板委托
@property(nonatomic,weak) id<DCWhiteBoardDelegate> whiteBoardDelegate;
//群组id
@property(nonatomic,strong) NSString *lastTeamId;
//
@property(nonatomic,strong) NSDictionary *messageInfo;

//初始化kit
- (void) initWithInfo:(NSDictionary* __nullable)info;
//添加自定义消息委托
- (void) addCustomMessageDelegate:(id<DCCustomMessageDelegate>)delegate;
//移除自定义消息委托
- (void) removeCustomMessageDelegate;
//发送自定义消息
- (void) sendCustomMessage:(NSString*)account content:(NSDictionary*)content callback:(nullable void (^)(DCError *error,NSDictionary *data))callback;
//创建群组聊天
- (void) createTeamChat:(NSArray*)user callback:(nullable void (^)(DCError *error,NSDictionary *data))callback;
//激活群组聊天
- (void) activedTeamChat;
//发送群组聊天文本消息
- (void) sendTeamChatTextMessage:(NSString*)teamId content:(NSString*)cotent;
//添加聊天消息监听
- (void) addChatMessageDelegate:(id<DCChatMessageDelegate>)delegate;
//移除聊天消息监听
- (void) removeChatMessageDelegate;
//添加业务消息监听
- (void) addBusiDelegate:(id<DCAvchatBusiDelegate>)delegate;
//移除业务消息监听
- (void) removeBusiDelegate;
//添加白板消息监听
- (void) addWhiteBoardDelegate:(id<DCWhiteBoardDelegate>)delegate;
//移除白板消息监听
- (void) removeWhiteBoardDelegate;

@end

NS_ASSUME_NONNULL_END
